<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>基本信息添加</title>
		<%@include file="../jslib/jquerylib.jsp"%>

		<link rel="stylesheet" type="text/css"
			href="<%=path%>/js/jqueryui/themes/default/easyui.css" />
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery.validate.min.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/DatePicker/WdatePicker.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js_css_image/js/base/jquery.form.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/checkJsp.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/additional-methods.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jqueryui/jquery.easyui.min.js"></script>
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/web/style/layout2.css" />
		<style type="text/css">
body {
	background: #ffffff;
	background-image: url(images/);
}
</style>
		<script type="text/javascript">
		 var api = frameElement.api, W = api.opener;
		 var changeButton = 0;
		 $(document).ready(function(){
	    	var optionsZancun = {
	    	    url:'<%=request.getContextPath()%>/visual/visualAction!addVisual.action',
	    	    beforeSubmit: checkedForm,
	    	    dataType:'json',
	    	    success: function(data) {
	    	    	if(data.result=='success'){
	    	    		alert("操作成功！");
	    	    		W.refresh();
	    	    		api.close();
	    	    	}else{
	    	    		alert("操作失败，请重试！");
	    	    	}
	    	    }
	    	};
	    	
		    //暂存表单
		    $('#saveBtn').click(function(){
			    $('#pageFrom').ajaxSubmit(optionsZancun);
		       	return false;
		     });
		     
		     $('#closeBtn').click(function(){
				api.close();
		     });
		 });
         function checkedForm(){
		    return true;
         }
         
         
         
	</script>
	</head>

	<body>
		<form id="pageFrom" action="" name="" method="post" enctype="multipart/from-data">
			<table width="100%" border="0" align="center" cellpadding="5"
				cellspacing="5" class="formTableNew">
				<input type="hidden" id="v_type" name="visualEntity.type" value="<%=request.getParameter("type")%>" />
				<input type="hidden" id="v_pid" name="visualEntity.parentid" value="<%=request.getParameter("pid")%>" />
				<tr>
					<td align="right" width='60'>
						名称：
					</td>
					<td align="left">
						<div class="div">
							<input type="text" id="name" name="visualEntity.visualname"
								 style="width: 470px" value="${visualEntity.visualname}" />
							<img src="<%=request.getContextPath()%>/images/xh.png"
								align="absmiddle"></img>
						</div>
					</td>
				</tr>
				<tr>
					<td align="right">
						图片：
					</td>
					<td align="left">
						<div class="div">
							<input type="file" id="picfile"  style="width:470px"
								name="picfile"
								value="" maxlength="30" />
						</div>
					</td>
				</tr>
				<tr>
					<td align="right">
						&nbsp;
					</td>
					<td align="left">
						注：建议图片宽为1366内容，上传后图片作为底图不进行缩放
					</td>
				</tr>
				<tr>
					<td align="right">
						备注：
					</td>
					<td align="left">
						<div class="div">
							<textarea rows="8" cols="5" style="width: 470px" name="visualEntity.remark">${visualEntity.remark }</textarea>
						</div>
					</td>
				</tr>
			</table>
			<table width="100%" border="0" align="center" cellpadding="5"
				cellspacing="5" class="formTableNew">
				<tr>
					<td align="center" colspan="6">
						<input type="button" id="saveBtn" value="保 存" class="form_bt_orange" />
						<input type="button" id="closeBtn" value="关 闭" class="form_bt_orange" />
					</td>
				</tr>
			</table>
			
		</form>
	</body>
</html>